<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>jsonGrd.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    
    <!--<link rel="stylesheet" type="text/css" href="./styles.css">-->
    <link rel="stylesheet" type="text/css" href="../ext/resources/css/ext-all.css">
  <script type="text/javascript" src="../ext/adapter/ext/ext-base.js"></script>
  <script type="text/javascript" src="../ext/ext-all.js"></script>
  
  </head>
  
  <body>
     <div id="hello"></div>
  </body>
  <script type="text/javascript">
     var data = [
           {id:"1",name:"zs",age:"22",sex:"nan"},
           {id:"2",name:"zs2",age:"23",sex:"girl"},
           {id:"3",name:"zs3",age:"24",sex:"nan"}
         ];
    var stor =  new Ext.data.JsonStore({data:data,fields:["id","name","age","sex"]});
    Ext.onReady(function(){
      var grd = new Ext.grid.GridPanel({
         title:'test grd',
         renderTo: 'hello',
         width: 500,
         height:300,
         columns:[
                 {header:'编号',dataIndex:'id'},
                 {header:'姓名',dataIndex:'name'},
                 {header:'年龄',dataIndex:'age'},
                 {header:'性别',dataIndex:'sex'}
                 ],
        store: stor,
        autoExpandColumn:2
         
      });
    });    
     
    
  </script>
</html>
